<?php

class UserController extends Controller
{
    public function actionGetdata()
    {
        $data = $this->connection->createCommand("select user_id as id,realname as text from crm_user ")
            ->queryAll();
        echo json_encode($data);
    }
}